//package com.nuonuo.refresh.config;
//
//import org.springframework.beans.factory.InitializingBean;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
//import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
//import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
//import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
//import org.springframework.cloud.context.config.annotation.RefreshScope;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.context.event.ContextRefreshedEvent;
//import org.springframework.context.event.EventListener;
////import org.springframework.context.event.ContextRefreshedEvent;
////import org.springframework.context.event.EventListener;
//
//import javax.annotation.PostConstruct;
//
///**
// * @author duan
// * @version 1.0
// * @date 2023/1/20 16:24
// */
//@Configuration
//@RefreshScope
////@ConditionalOnProperty(value = "listener.on", matchIfMissing = false)
//public class TestListener implements InitializingBean {
//
//    @Value("${my.username:dd}")
//    private String username;
//
//    @PostConstruct
//    public void init() {
//        System.out.println("test.....");
//    }
//
//    @EventListener(ContextRefreshedEvent.class)
//    public void print() {
//        System.out.println("22222");
//    }
//
//    @Override
//    public void afterPropertiesSet() throws Exception {
//        System.out.println("$$$$$$$$$$$$$$$$");
//        System.out.println(username);
//    }
//}
